//
//  ST_TestST_HeroHomepageController.swift
//  btvideo
//
//  Created by Jason on 2021/11/12.
//  Copyright © 2021 JarvanZhang. All rights reserved.
//

import UIKit

class ST_TestST_HeroHomepageController: UIViewController,ST_VMControllerLightNavBarProduce {
    
    lazy var tain_navigation_bar:ST_TIANLightNavigationBar = {
        let c = ST_TIANLightNavigationBar()
        c.title_nav_btn.setTitleForAllStates("测试跳转")
        c.backgroundColor = .clear
        return c
    }()
    
    
    let img:UIImage
    
    let imgHeight:CGFloat
    
    init(image:UIImage,height:CGFloat){
        
        self.img = image
        
        self.imgHeight = height
        
        super.init(nibName: nil, bundle: nil)
        
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

    override func viewDidLoad() {
        super.viewDidLoad()
        
        defer {
            layout_navigation_bar()
        }
        
        view.backgroundColor = .clear
        view.addSubview(cover_image_view)
        
        cover_image_view.snp.makeConstraints { make in
            make.top.right.left.equalToSuperview()
            make.height.equalTo(imgHeight)
        }
    }
    
    
    
    fileprivate(set) lazy var cover_image_view:UIImageView = {
        let control = UIImageView.init(image: img)
        control.contentMode = UIView.ContentMode.scaleAspectFill
        control.cornerRadius = 20
        return control
    }()
}
